﻿using System;
using System.Data;
using TimKen.DataEntity;
namespace TimKen.BussLogic
{
    /// <summary>
    /// 出货单业务逻辑操作类
    /// </summary>
    public class ShipItemManager
    {
        private readonly TimKen.DataAccess.ShipItemDAO dal = new TimKen.DataAccess.ShipItemDAO();
        public ShipItemManager()
        { }
        #region  成员方法

        /// <summary>
        /// 得到最大ID
        /// </summary>
        /*
        public int GetMaxId()
        {
            return dal.GetMaxId();
        }
        */
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(int ItemNo,string ShipNo)
        {
            return dal.Exists(ItemNo, ShipNo);
        }

        /// <summary>
        /// 增加一条数据
        /// </summary>
        public void Add(TimKen.DataEntity.ShipItem model)
        {
            dal.Add(model);
        }

        /// <summary>
        /// 更新一条数据
        /// </summary>
        public void Update(TimKen.DataEntity.ShipItem model)
        {
            dal.Update(model);
        }

        /// <summary>
        /// 删除一条数据
        /// </summary>
        public void Delete(int ItemNo, string ShipNo)
        {

            dal.Delete(ItemNo, ShipNo);
        }

        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public TimKen.DataEntity.ShipItem GetModel(int ItemNo, string ShipNo)
        {

            return dal.GetModel(ItemNo, ShipNo);
        }

        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetList(string strWhere)
        {
            return dal.GetList(strWhere);
        }

        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetAllList()
        {
            return GetList("");
        }

        /// <summary>
        /// 获得数据列表
        /// </summary>
        //public DataSet GetList(int PageSize,int PageIndex,string strWhere)
        //{
        //return dal.GetList(PageSize,PageIndex,strWhere);
        //}

        /// <summary>
        /// 获得出货情况列表
        /// </summary>
        public DataSet GetOrderShipList(string OrderID)
        {
            return dal.GetOrderShipList(OrderID);
        }

        public DataSet GetOrderItemShipList(string OrderItemID) {
            return dal.GetOrderItemShipList(OrderItemID);
        }

        #endregion  成员方法
    }
}

